package com.ruoyi.seedlingSys.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.seedlingSys.mapper.JiagongMapper;
import com.ruoyi.seedlingSys.domain.Jiagong;
import com.ruoyi.seedlingSys.service.IJiagongService;

/**
 * 加工管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-11
 */
@Service
public class JiagongServiceImpl implements IJiagongService 
{
    @Autowired
    private JiagongMapper jiagongMapper;

    /**
     * 查询加工管理
     * 
     * @param jiaGongID 加工管理主键
     * @return 加工管理
     */
    @Override
    public Jiagong selectJiagongByJiaGongID(Long jiaGongID)
    {
        return jiagongMapper.selectJiagongByJiaGongID(jiaGongID);
    }

    /**
     * 查询加工管理列表
     * 
     * @param jiagong 加工管理
     * @return 加工管理
     */
    @Override
    public List<Jiagong> selectJiagongList(Jiagong jiagong)
    {
        return jiagongMapper.selectJiagongList(jiagong);
    }

    /**
     * 新增加工管理
     * 
     * @param jiagong 加工管理
     * @return 结果
     */
    @Override
    public int insertJiagong(Jiagong jiagong)
    {
        jiagong.setCreateTime(DateUtils.getNowDate());
        return jiagongMapper.insertJiagong(jiagong);
    }

    /**
     * 修改加工管理
     * 
     * @param jiagong 加工管理
     * @return 结果
     */
    @Override
    public int updateJiagong(Jiagong jiagong)
    {
        jiagong.setUpdateTime(DateUtils.getNowDate());
        return jiagongMapper.updateJiagong(jiagong);
    }

    /**
     * 批量删除加工管理
     * 
     * @param jiaGongIDs 需要删除的加工管理主键
     * @return 结果
     */
    @Override
    public int deleteJiagongByJiaGongIDs(Long[] jiaGongIDs)
    {
        return jiagongMapper.deleteJiagongByJiaGongIDs(jiaGongIDs);
    }

    /**
     * 删除加工管理信息
     * 
     * @param jiaGongID 加工管理主键
     * @return 结果
     */
    @Override
    public int deleteJiagongByJiaGongID(Long jiaGongID)
    {
        return jiagongMapper.deleteJiagongByJiaGongID(jiaGongID);
    }
}
